<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MNNKit: MNNPortraitSegmentor Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="mnn.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MNNKit
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">MNNKit is a collection of AI solutions on mobile phone, powered by MNN engine.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Instance Methods</a> &#124;
<a href="#pub-static-methods">Class Methods</a> &#124;
<a href="interface_m_n_n_portrait_segmentor-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">MNNPortraitSegmentor Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Portrait Segmentor Class.  
 <a href="interface_m_n_n_portrait_segmentor.html#details">More...</a></p>

<p><code>#import &lt;<a class="el" href="_m_n_n_portrait_segmentor_8h_source.html">MNNPortraitSegmentor.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for MNNPortraitSegmentor:</div>
<div class="dyncontent">
 <div class="center">
  <img src="interface_m_n_n_portrait_segmentor.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Instance Methods</h2></td></tr>
<tr class="memitem:ad811582096cdda62b0b714b74eb0ce5d"><td class="memItemLeft" align="right" valign="top">(NSArray&lt; NSNumber * &gt; *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_m_n_n_portrait_segmentor.html#ad811582096cdda62b0b714b74eb0ce5d">inference:angle:flipType:error:</a></td></tr>
<tr class="separator:ad811582096cdda62b0b714b74eb0ce5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af744cad5cc90a601e12d13709ae2b4ae"><td class="memItemLeft" align="right" valign="top">(NSArray&lt; NSNumber * &gt; *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_m_n_n_portrait_segmentor.html#af744cad5cc90a601e12d13709ae2b4ae">inferenceImage:angle:flipType:error:</a></td></tr>
<tr class="separator:af744cad5cc90a601e12d13709ae2b4ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4828052f27c79881595db87ba42b1f79"><td class="memItemLeft" align="right" valign="top">(NSArray&lt; NSNumber * &gt; *)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="interface_m_n_n_portrait_segmentor.html#a4828052f27c79881595db87ba42b1f79">inference:width:height:format:angle:flipType:error:</a></td></tr>
<tr class="separator:a4828052f27c79881595db87ba42b1f79"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Class Methods</h2></td></tr>
<tr class="memitem:a758fa222cae6f59b6a2bd8e4eaf45ea3"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_m_n_n_portrait_segmentor.html#a758fa222cae6f59b6a2bd8e4eaf45ea3">createInstanceAsync:</a></td></tr>
<tr class="separator:a758fa222cae6f59b6a2bd8e4eaf45ea3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae007a3605773525a2078ea18b5dfb254"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">+ <a class="el" href="interface_m_n_n_portrait_segmentor.html#ae007a3605773525a2078ea18b5dfb254">createInstanceAsync:callbackQueue:</a></td></tr>
<tr class="separator:ae007a3605773525a2078ea18b5dfb254"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Portrait Segmentor Class. </p>
</div><h2 class="groupheader">Method Documentation</h2>
<a id="a758fa222cae6f59b6a2bd8e4eaf45ea3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a758fa222cae6f59b6a2bd8e4eaf45ea3">&#9670;&nbsp;</a></span>createInstanceAsync:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (void) createInstanceAsync: </td>
          <td></td>
          <td class="paramtype">(void(^)(NSError *error, <a class="el" href="interface_m_n_n_portrait_segmentor.html">MNNPortraitSegmentor</a> *portraitSegmentor))&#160;</td>
          <td class="paramname"><em>block</em></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>create portrait segmentor instance asynchronously, call back in in main thread. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">block</td><td>call back after created, error is nil if call back successfully </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ae007a3605773525a2078ea18b5dfb254"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae007a3605773525a2078ea18b5dfb254">&#9670;&nbsp;</a></span>createInstanceAsync:callbackQueue:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">+ (void) <a class="el" href="interface_m_n_n_portrait_segmentor.html#a758fa222cae6f59b6a2bd8e4eaf45ea3">createInstanceAsync:</a> </td>
          <td></td>
          <td class="paramtype">(void(^)(NSError *error, <a class="el" href="interface_m_n_n_portrait_segmentor.html">MNNPortraitSegmentor</a> *portraitSegmentor))&#160;</td>
          <td class="paramname"><em>block</em></td>
        </tr>
        <tr>
          <td class="paramkey">callbackQueue:</td>
          <td></td>
          <td class="paramtype">(dispatch_queue_t)&#160;</td>
          <td class="paramname"><em>callbackQueue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>create portrait segmentor instance asynchronously, call back in designated thread. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">block</td><td>call back after created, error is nil if call back successfully </td></tr>
    <tr><td class="paramname">callbackQueue</td><td>call back int this designated thread, in main thread if nil. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad811582096cdda62b0b714b74eb0ce5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad811582096cdda62b0b714b74eb0ce5d">&#9670;&nbsp;</a></span>inference:angle:flipType:error:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (NSArray&lt;NSNumber*&gt; *) inference: </td>
          <td></td>
          <td class="paramtype">(CVPixelBufferRef)&#160;</td>
          <td class="paramname"><em>pixelBuffer</em></td>
        </tr>
        <tr>
          <td class="paramkey">angle:</td>
          <td></td>
          <td class="paramtype">(float)&#160;</td>
          <td class="paramname"><em>inAngle</em></td>
        </tr>
        <tr>
          <td class="paramkey">flipType:</td>
          <td></td>
          <td class="paramtype">(MNNFlipType)&#160;</td>
          <td class="paramname"><em>outputFlipType</em></td>
        </tr>
        <tr>
          <td class="paramkey">error:</td>
          <td></td>
          <td class="paramtype">(NSError *__autoreleasing *)&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>inference using system camera as input. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pixelBuffer</td><td>input dat in CVPixelBufferRef format </td></tr>
    <tr><td class="paramname">inAngle</td><td>input angle, the clock-wise rotation angle applied on the input image, the portrait would be in the top-to-bottom direction after rotated. </td></tr>
    <tr><td class="paramname">outputFlipType</td><td>mirror type applied on the result feature points: NONE (FLIP_NONE), X-axis flipping (FLIP_X), Y-axis flipping (FLIP_Y), Center flipping (FLIP_XY) </td></tr>
    <tr><td class="paramname">error</td><td>error message, inference successfully if nil </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a4828052f27c79881595db87ba42b1f79"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4828052f27c79881595db87ba42b1f79">&#9670;&nbsp;</a></span>inference:width:height:format:angle:flipType:error:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (NSArray&lt;NSNumber*&gt; *) inference: </td>
          <td></td>
          <td class="paramtype">(unsigned char *)&#160;</td>
          <td class="paramname"><em>data</em></td>
        </tr>
        <tr>
          <td class="paramkey">width:</td>
          <td></td>
          <td class="paramtype">(float)&#160;</td>
          <td class="paramname"><em>w</em></td>
        </tr>
        <tr>
          <td class="paramkey">height:</td>
          <td></td>
          <td class="paramtype">(float)&#160;</td>
          <td class="paramname"><em>h</em></td>
        </tr>
        <tr>
          <td class="paramkey">format:</td>
          <td></td>
          <td class="paramtype">(MNNCVImageFormat)&#160;</td>
          <td class="paramname"><em>format</em></td>
        </tr>
        <tr>
          <td class="paramkey">angle:</td>
          <td></td>
          <td class="paramtype">(float)&#160;</td>
          <td class="paramname"><em>inAngle</em></td>
        </tr>
        <tr>
          <td class="paramkey">flipType:</td>
          <td></td>
          <td class="paramtype">(MNNFlipType)&#160;</td>
          <td class="paramname"><em>outputFlipType</em></td>
        </tr>
        <tr>
          <td class="paramkey">error:</td>
          <td></td>
          <td class="paramtype">(NSError *__autoreleasing *)&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>inference using common data input </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>input data, int unsigned char format </td></tr>
    <tr><td class="paramname">w</td><td>data width </td></tr>
    <tr><td class="paramname">h</td><td>data height </td></tr>
    <tr><td class="paramname">format</td><td>data format </td></tr>
    <tr><td class="paramname">inAngle</td><td>input angle, the clock-wise rotation angle applied on the input image, the portrait would be in the top-to-bottom direction after rotated. </td></tr>
    <tr><td class="paramname">outputFlipType</td><td>mirror type applied on the result feature points: NONE (FLIP_NONE), X-axis flipping (FLIP_X), Y-axis flipping (FLIP_Y), Center flipping (FLIP_XY) </td></tr>
    <tr><td class="paramname">error</td><td>error message, inference successfully if nil </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="af744cad5cc90a601e12d13709ae2b4ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af744cad5cc90a601e12d13709ae2b4ae">&#9670;&nbsp;</a></span>inferenceImage:angle:flipType:error:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (NSArray&lt;NSNumber*&gt; *) inferenceImage: </td>
          <td></td>
          <td class="paramtype">(UIImage *)&#160;</td>
          <td class="paramname"><em>image</em></td>
        </tr>
        <tr>
          <td class="paramkey">angle:</td>
          <td></td>
          <td class="paramtype">(float)&#160;</td>
          <td class="paramname"><em>inAngle</em></td>
        </tr>
        <tr>
          <td class="paramkey">flipType:</td>
          <td></td>
          <td class="paramtype">(MNNFlipType)&#160;</td>
          <td class="paramname"><em>outputFlipType</em></td>
        </tr>
        <tr>
          <td class="paramkey">error:</td>
          <td></td>
          <td class="paramtype">(NSError *__autoreleasing *)&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>inference image </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>image in UIImage format </td></tr>
    <tr><td class="paramname">inAngle</td><td>input angle, the clock-wise rotation angle applied on the input image, the portrait would be in the top-to-bottom direction after rotated. </td></tr>
    <tr><td class="paramname">outputFlipType</td><td>mirror type applied on the result feature points: NONE (FLIP_NONE), X-axis flipping (FLIP_X), Y-axis flipping (FLIP_Y), Center flipping (FLIP_XY) </td></tr>
    <tr><td class="paramname">error</td><td>error message, inference successfully if nil </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>MNNPortraitSegmentation/iOS/MNNPortraitSegmentation/MNNPortraitSegmentation/<a class="el" href="_m_n_n_portrait_segmentor_8h_source.html">MNNPortraitSegmentor.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
